def simple(n):
    d = 0
    for i in range(1, n + 1):
        if n % i == 0:
            d += 1
    if d == 2:
        return True
    return False


digit = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
s = input().split()
s1 = ""
flag = 0
for d in s:
    if d in digit:
        s1 += str(digit.index(d))
    else:
        flag = 1
if len(s) != 3:
    flag = 1

if flag:
    print("Wrong input")
else:
    print(int(s1))
